import 'package:workmate/models/api.dart';
import 'package:workmate/models/base.dart';

class ConfigModel extends BaseModel {
  late String appname;
  late ApiModel api;

  ConfigModel.fromJson(Map<String, dynamic> json) {
    appname = json['appname'] ?? 'app demo';
    api = ApiModel.fromJson(json['api'] ?? {});
  }

  @override
  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = {};
    data['appname'] = appname;
    return data;
  }
}
